import { createBrowserRouter, Navigate } from 'react-router-dom'
import App from '../App'
import Cart from '../pages/Cart/Cart'
import Home from '../pages/home/Home'
import My from '../pages/my/My'
import VideoPage from '../pages/video/VideoPage'
import Message from '../pages/message/Message'
const router = createBrowserRouter([
    {
        path: '/',
        element: <Navigate to='/app/home' ></Navigate>
    },
    {
        path: '/app',
        element: <App></App>,
        children: [
            {
                path: '/app/cart',
                element: <Cart></Cart>
            },
            {
                path: '/app/home',
                element: <Home></Home>
            },
            {
                path: '/app/video',
                element: <VideoPage></VideoPage>
            },
            {
                path: '/app/message',
                element: <Message></Message>
            },
            {
                path: '/app/my',
                element: <My></My>
            }
        ]
    }
])
export default router